package com.groupbuying.settleproducer.connector;

import com.groupbuying.settleproducer.utils.apiresult.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author WYN
 * @date 2019/9/2
 * @email wyn20140226@aliyun.com
 * @des 金额中心feign接口
 */
@Service
@FeignClient(name = "service-financial")
public interface FinancialFeign {

    /**
     * 余额退款
     * @Author cuich
     * @Date 2019/9/2 17:23
     * @param params
     * @return com.groupbuying.settleproducer.utils.apiresult.ApiResult
     **/
    @PostMapping(value="financialBalancePay/balanceRefund")
    ApiResult balanceRefund(@RequestParam Map<String, Object> params);

    /**
     * 积分退款
     * @Author cuich
     * @Date 2019年9月19日17:10:13
     **/
    @PostMapping(value="/gyintegralpay/integralrefund")
    ApiResult integralRefund(@RequestParam Map<String, Object> params);

    /**
     * 调用金融中心代付---余额
     */
    @RequestMapping(value = "/financialBalancePay/balancePayment", method = RequestMethod.POST)
    Boolean balancePayment (@RequestParam Map<String, Object> mapParams);

    /**
     * 调用金融中心代付---积分
     */
    @RequestMapping(value = "/gyintegralpay/integralPayment", method = RequestMethod.POST)
    Boolean integralPayment (@RequestParam Map<String, Object> mapParams);


}
